﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonClasses
{
    public class BJDeck : Deck
    {
        public override void initialize_cards()
        {
            Cards.Clear();

            for (int i = 0; i < suits.Count(); i++)
            {
                for (int j = 0; j < rank.Count(); j++)
                {
                    string img_path = string.Format(@"C:\Temp\CardImages\{0}{1}.png", rank[j], suits[i]);
                    string fd_img_path = @"C:\Temp\CardImages\facedown.png";

                    int num_value;

                    switch (j)
                    {
                        case 9:  // Refers to "j"(jack).        
                        case 10:  // "q"(queen)                    
                        case 11:  // "k"(king)     
                            num_value = 10;
                            break;
                        case 12:  // Refers to "a"(ace).
                            num_value = 11;
                            break;
                        default:
                            num_value = j + 2;
                            break;
                    }

                    Card card = new Card(suits[i], rank[j], num_value, true, img_path, fd_img_path);
                    Cards.Add(card);
                }
            }
        }
    }
}
